﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AbstraX.ServerInterfaces;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;
using AbstraX;
using AbstraX.Templates;
using AbstraX.AssemblyInterfaces;
using AbstraX.Contracts;
using MvvmTreeView;

namespace AssemblyProvider.Web.Entities
{
    [KnownType(typeof(ConstructorOperation)), KnownType(typeof(MethodOperation)), ClientCodeGeneration(typeof(AbstraXClientInterfaceGenerator))]
    public abstract class Operation : IOperation, IBaseOperation
    {
        public abstract OperationDirection Direction { get; }
        public abstract IEnumerable<IElement> ChildElements { get; }
        [Key, DataMember]
        public string ID { get; set; }

        public abstract string ParentID { get; }
        public abstract string Name { get; }
        public abstract string Description { get; }
        public abstract string Documentation { get; }
        public abstract string ImageURL { get; }
        public abstract IBase Parent { get; }
        public abstract string FolderKeyPair { get; set; }
        public abstract DefinitionKind Kind { get; }
        public abstract void ExecuteWhere(string property, object value);
        public abstract void ExecuteWhere(System.Linq.Expressions.Expression expression);
        public abstract void ExecuteWhere(AbstraX.XPathBuilder.XPathAxisElement element);
        public abstract void ClearPredicates();
        public abstract bool HasChildren { get; }
        public abstract string DebugInfo { get; }
        public abstract float ChildOrdinal { get; }
        public abstract IRoot Root { get; }
        IAbstraXExtension IBase.LoadExtention(IBase baseObject, ITreeNode treeNode)
        {
            return null;
        }
     }
}
